<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>上传相片</title>
<script type="text/javascript" src="/Public/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/Public/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/Public/js/lazyload.js"></script>
<script type="text/javascript" src="/artDialog/artDialog.source.js?skin=default" charset="utf-8"></script>
<script type="text/javascript" src="/Public/js/jquery.ae.image.resize.min.js"></script>
<!--<script type="text/javascript" src="/Public/js/jquery.tooltip.js"></script>
--><link rel="stylesheet" href="/Public/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="/theme/default/css/common.css">
<link rel="stylesheet" href="/theme/default/css/facesbaby-theme.css">
<!--   <link rel="stylesheet" type="text/css" href="/Public/bootstrap/css/bootstrap-ie6.css">-->

  <!--[if lte IE 6]>
  <link rel="stylesheet" type="text/css" href="/Public/bootstrap/css/bootstrap-ie6.css">
  <![endif]-->
  <!--[if lte IE 7]>
  <link rel="stylesheet" type="text/css" href="/Public/bootstrap/css/ie.css">
  <![endif]-->

<style type="text/css">
fieldset legend{
padding-left:0	
}
.label_set{
width:80px;
text-align:left;
}
</style>
<script type="text/javascript" src="/Public/data/DataLabel.js"></script>
<script type="text/javascript" src="/Public/swfupload/js/swfupload.js"></script>
<?php
//需要重新获取BB数据
$baby_json = array();
foreach($_SESSION['session_fb'] as $k=>$v){
	$baby_json[]=$v;
}
?>
<script type="text/javascript">
var current_babyid = <?php echo $_SESSION['session_babyid'];?>;
var baby_json = <?php
echo json_encode($baby_json);
?>;
</script>
<script type="text/javascript" src="/Public/swfupload/js/handlers.js"></script>

		<script type="text/javascript">
			var swfu;
			window.onload = function () {
				swfu = new SWFUpload({
					upload_url: "http://<?php echo $_SERVER['HTTP_HOST'];?>/?s=Albums/PhotoPost",
					post_params: {"user_id" : <?php echo $_SESSION['session_id'];?>},
					
					// File Upload Settings
					file_size_limit : "5 MB",	// 1000MB
					file_types : "*.jpg;*.bmp;*.png",
					file_types_description : "所有文件",
					file_upload_limit : "10",
									
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
					file_queued_handler : fileQueuedByDesign,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadByDesignSuccess,
					upload_complete_handler : uploadComplete,
	
					// Button Settings
					button_image_url : "/Public/swfupload/images/SmallSpyGlassWithTransperancy_17x18.png",
					button_placeholder_id : "spanButtonPlaceholder",
					button_width: 180,
					button_height: 18,
					button_text : '<span class="button">请选择相片 <span class="buttonSmall">(小于5MB)</span></span>',
					button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
					button_text_top_padding: 0,
					button_text_left_padding: 18,
					button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
					button_cursor: SWFUpload.CURSOR.HAND,
					
					// Flash Settings
					flash_url : "http://<?php echo $_SERVER['HTTP_HOST'];?>/Public/swfupload/js/swfupload.swf",
	
					custom_settings : {
						upload_target : "divFileProgressContainer"
					},
					// Debug Settings
					debug: false  //是否显示调试窗口
				});
			};
			function startUploadFile(){
				swfu.startUpload();
			}

		</script>
</head>

<body>
<div class="container">
<include file="./template/default/Public/header.html" />
</div>  

<div class="container">          
<div id="page">

      <div class="container">
      
      
      <section id="main">
<div class="upload">
<fieldset>
<form method="post" action="/index.php?s=/Home/Albums/doAlbums" target="_blank">
<legend>上传相片</legend>
<div style="border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 10px 17px;">

                    <table>
                    <tr>
                    	<td>
                        <div id="spanButtonPlaceholder" style="width:180px; height:18px;"></div>
                        </td>
                        <td>
                        <button type="button" id="btnUpload" class="button primary" onclick="startUploadFile()">上传</button>
                        <button type="button" id="btnCancel" class="button" onclick="cancelUpload()" disabled="disabled">取消所有上传</button>
					
                        </td>
                    </tr>
                    </table>
					
					
				</div>
<div id="divFileProgressContainer"></div>
<div>
<table border="1" class="defaulttable" style="width:100%">
<thead>
	<tr>
    	<th>图片</th>
        <th>属性</th>
    </tr>
</thead>
<tbody id="photo_preview"></tbody>
</table>
</div>
			<div id="thumbnails" style="display:none">
				<table id="infoTable" border="0" width="530" style="display: inline; border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 2px;margin-top:8px;">
				</table>
			</div>
            <div>
            <button type="submit" class="btn">提交</button>
            </div>
            </form>
</fieldset>
</div>
      </section>
      
      </div>
</div>

</div>




</body>
</html>